<table>
  <tbody>
    <tr>
      <th>MC No:</th>
      <td><?php echo $client->getmc_no() ?></td>
    </tr>
    <tr>
      <th>Client Name:</th>
      <td><?php echo $client->getname() ?></td>
    </tr>
    <tr>
      <th>Client Type:</th>
      <td><?php echo $client->getclient_type() ?></td>
    </tr>
    <tr>
      <th>Client Since:</th>
      <td><?php echo $client->getcreated_at() ?></td>
    </tr>
    <tr>
     <?php foreach ($add_list as $add): ?>
      <th>Address:</th>
      <tr>
	  <th></th><th>Unit No.:</th>
	  <td><?php echo $add->getunit_no() ?></td>
	  </tr>
	  <tr>
	  <th></th><th>Building Name:</th>
	  <td><?php echo $add->getbuilding_name() ?></td>
	  </tr>
	   <tr>
	  <th></th><th>Building no:</th>
	  <td><?php echo $add->getbuilding_no() ?></td>
	  </tr>
	  <tr>
	  <th></th><th>Street:</th>
	  <td><?php echo $add->getstreet() ?></td>
	  </tr>
	  	  <tr>
	  <th></th><th>Village/Subdivision:</th>
	  <td><?php echo $add->getvillage_subdivision() ?></td>
	  </tr>
	  	  <tr>
	  <th></th><th>Barangay:</th>
	  <td><?php echo $add->getbarangay() ?></td>
	  </tr>
	  	  <tr>
	  <th></th><th>City:</th>
	  <td><?php echo $add->getcity() ?></td>
	  </tr>
	  	  <tr>
	  <th></th><th>Zip Code:</th>
	  <td><?php echo $add->getzip_code() ?></td>
	  </tr>
	  	<tr>
	  <th></th><th>Type:</th>
	  <td><?php echo $add->gettype() ?></td>
	  </tr>
	  	<tr>
	  <th></th><th>Country:</th>
	  <td><?php echo $add->getcountry() ?></td>
	  </tr>	  
	  </tr>	  
    <?php endforeach; ?>
    <tr>
     <?php foreach ($web_list as $web): ?>
      <th>Websites:</th>
      <td><?php echo $web->geturl() ?></td>
    </tr>
    <?php endforeach; ?>
    <tr>
	      <th>Contact Numbers:</th>
     <?php foreach ($phone_list as $phone): ?>
      <tr>
      <th><?php echo $phone->getphone_type() ?></th><td><?php echo $phone->getnumber() ?></td>
			<td><?php echo link_to('Delete', 'phone/delete?id='.$phone->getid(), array('method' => 'delete', 'confirm' => 'Are you sure?')) ?></td>
    	</tr>
    </tr>
    <?php endforeach; ?>
    
      </tbody>
</table>
<a href="<?php echo url_for('mc/edit?id='.$client['id']) ?>">Edit</a>



<br />
<br />

<b>Contact Persons</b>
<table class='sortable' id='sortable'>
	<thead>
	<tr>
		<td>Last Name</td>
		<td>First Name</td>
	</tr>
	</thead>
<?php foreach($client->getPerson() as $contact_person): ?>
<?php if($contact_person->getType()=='contact'): ?>

  <tr id="contact<?php echo $contact_person->getId()?>">
    <td><?php echo $contact_person->getLastName(); ?></td>
    <td><?php echo $contact_person->getFirstName(); ?></td>
<td><a href="<?php echo url_for('contact_person/edit?id='.$contact_person->getId().'&client_id='.$client->getId())?>">edit</a>
</tr>
<?php endif;?>
<?php endforeach; ?>
</table>
<a href="<?php echo url_for('contact_person/new?client_id='.$client->getId())?>">New Contact Person</a>



<br />
<br />
<b>Passengers</b>
	<table class = "display" id="passenger_table">
	<thead>
		<tr>
			<th>PX #</th>
			<th>Last Name</th>
			<th>First Name</th>
			<th>Actions</th>
		</tr>
	</thead>
	<tbody>
	<?php foreach($client->getPerson() as $px): ?>
		<?php if($px->getType()=='PX'): ?>
	  <tr id="contact<?php echo $px->getId()?>">
			<td><?php echo $px->getpx_no(); ?></td>
	    <td><?php echo $px->getLastName(); ?></td>
	    <td><?php echo $px->getFirstName(); ?></td>
			<td><a href="<?php echo url_for('px/show?id='.$px->getId().'&client_id='.$client->getId())?>">edit</a></td>
		</tr>
		<?php endif;?>
	<?php endforeach; ?>
	</tbody>
</table>

<a href="<?php echo url_for('px/new?client_id='.$client->getId())?>">New Passenger</a>
<?php slot('submenu') ?>
<ul>
	<li><?php echo link_to(image_tag('contact info.png', array('title'=>"Contact Info", 'width'=>'65px')), 'mc/show?id='.$client_id) ?></li>
	<li><?php echo link_to(image_tag('officers.png', array('title'=>"Officers", 'width'=>'65px')),'officers/index?client_id='.$client_id) ?></li>
	<li><?php echo link_to(image_tag('managementteam.png', array('title'=>"ManagementTeam", 'width'=>'65px')),'management_team/index?client_id='.$client_id) ?></li>
	<li><?php echo link_to(image_tag('companydescription.png', array('title'=>"Company Description", 'width'=>'65px')), 'company_description/index?client_id='.$client_id) ?></li>
	<li><?php echo link_to(image_tag('other note.png', array('title'=>"Other Notes", 'width'=>'65px')), 'mc_note/index?client_id='.$client_id) ?></li>		
</ul>
<?php end_slot() ?>


<script type="text/javascript">
jQuery(document).ready(jQuery(function() {
	jQuery('#passenger_table').dataTable();
} ));


</script>


